home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4377 < prev    next >
Encoding:
Text File  |  1996-08-05  |  801 b   |  27 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.dcs.warwick.ac.uk!not-for-mail
  3. From: D.C.Molero@dcs.warwick.ac.uk (Daniel Castillo Molero)
  4. Subject: random number
  5. X-Nntp-Posting-Host: sword
  6. Message-ID: <1996Feb4.020051.12889@dcs.warwick.ac.uk>
  7. Sender: news@dcs.warwick.ac.uk (Network News)
  8. Organization: Department of Computer Science, Warwick University, England
  9. Date: Sun, 4 Feb 1996 02:00:51 GMT
  10.  
  11. Hi,
  12. Could anybody help me to generate some code to produce
  13. a random number between -3 and 3 ?
  14. I'm trying to useárand(), but since it doesn't receive
  15. any argument, I cannot specify the range. Probably one
  16. way would be to access the constant RAND_MAX, but I don't know
  17. how to do this, since I'm new in c.
  18. Any help will be grately appreciated.
  19. Thank you.
  20.  
  21. Dan
  22.  
  23. -- 
  24. * Daniel Castillo.  D.C.Molero@dcs.warwick.ac.uk *
  25.  
  26.  
  27.